package com.weixing.mall.provider.api.fallback;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.weixing.mall.base.orm.MPage;
import com.weixing.mall.base.wrapper.Result;
import com.weixing.mall.base.wrapper.ResultUtil;
import com.weixing.mall.provider.api.model.dto.GoodPrintRpcDto;
import com.weixing.mall.provider.api.model.query.ActGoodsQuery;
import com.weixing.mall.provider.api.model.query.ErpGoodsQuery;
import com.weixing.mall.provider.api.model.vo.ActivityProductVo;
import com.weixing.mall.provider.api.model.vo.ErpProductVo;
import com.weixing.mall.provider.api.model.vo.ItemVo;
import com.weixing.mall.provider.api.service.ItemFeign;
import org.springframework.stereotype.Component;

import java.util.List;

/**
 * @Author: kfc
 * @Description: <br/>
 * Date:Create in 2019/10/9 15:50
 * @Modified By:
 */
@Component
public class ItemFeignFallback implements ItemFeign {

    @Override
    public Result<List<ActivityProductVo>> findActProductVoByIds(long[] productIds) {
        return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public Result<ItemVo> findProductVoByProductSn(String productSn) {
        return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public Result findActProductVo(ActGoodsQuery goodsQuery) {
        return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public Result<List<ActivityProductVo>> findByGoodsn(String goodSn) {
        return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public Result<List<ActivityProductVo>> findProductVo(ActGoodsQuery goodsQuery) {
         return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public Result printGoods(List<GoodPrintRpcDto> goodPrintRpcDto) {
        return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public Result<IPage<ActivityProductVo>> findProductVoByCreatedId(Page page, Long createdById) {
        return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public  Result<ItemVo> findById(Long itemId) {
        return ResultUtil.error("商品服务暂时不可用！");
    }

    @Override
    public List<ItemVo> selectProduct() {
        return null;
    }

    @Override
    public List<ItemVo> getBygoodSn(String goodSn) {
        return null;
    }


    @Override
    public Result<MPage<ErpProductVo>> getErpGoodsList(ErpGoodsQuery goodsQuery) {
        return ResultUtil.error("商品服务暂时不可用！");
    }
}
